namespace cnVery.bbs.UI.Admin
{
    using cnVery.bbs.Kernel;
    using cnVery.Controls;
    using System;

    public class admin_readme : AdminMain
    {
        protected Span bbsname;
        protected Span bbsversion;
        protected Span copyright;
        protected Span iframesrc;

        private void InitializeComponent()
        {
            base.Load += new EventHandler(this.Page_Load);
        }

        protected override void OnInit(EventArgs e)
        {
            this.InitializeComponent();
            base.OnInit(e);
        }

        private void Page_Load(object sender, EventArgs e)
        {
            this.bbsname.Text = Property.bbsName;
            this.bbsversion.Text = Property.bbsVersion;
            this.copyright.Text = "<a href='http://www.cnvery.net' target='_blank'>http://www.cnvery.net</a>";
            int scalar = (int) base.conn.GetScalar("select count(*) from bbs_topic where isdelete=0");
            int num2 = (int) base.conn.GetScalar("select count(*) from bbs_user where isdelete=0");
            object obj2 = base.conn.GetScalar("select sum(replies) from bbs_topic where isdelete=0");
            int num3 = (obj2.ToString() == string.Empty) ? 0 : int.Parse(obj2.ToString());
            this.iframesrc.Text = "http://www.cnvery.net/cvb/version_checkupdate.aspx";
            this.iframesrc.Text = this.iframesrc.Text + "?version=" + base.Server.UrlEncode(this.bbsversion.Text);
            this.iframesrc.Text = this.iframesrc.Text + "&bbsname=" + base.Server.UrlEncode(this.bbsname.Text);
            this.iframesrc.Text = this.iframesrc.Text + "&topics=" + scalar;
            this.iframesrc.Text = this.iframesrc.Text + "&replies=" + num3;
            this.iframesrc.Text = this.iframesrc.Text + "&users=" + num2;
            this.iframesrc.Visible = true;
            this.Finish();
        }
    }
}

